<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="tfn" uri="http://www.totoro.com/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<div class="col-sub J_TRegion" style="overflow:visible;">
    <div class="J_TModule" style="overflow: auto;">
        <div class="skin-box tb-module tshop-pbsm tshop-pbsm-shop-srch-inshop">
            <s class="skin-box-tp"><b></b></s>
            <div class="skin-box-hd">
                <i class="hd-icon"></i>
                <h3>
										<span>
											本店搜索
										</span>
                </h3>
            </div>
            <div class="skin-box-bd" style="overflow: auto;  width: 188px;">
                <form method="get" action="/shop/search.htm">
                    <ul>
                        <input type="hidden" name="search">
                        <li class="keyword">
                            <label for="keyword">
                                <input type="hidden" name="brandId" value="${shop.id}"/>
                                <span class="key">关键字</span>
                                <input type="text" size="18" name="keyWord" value="" class="keyword-input J_TKeyword prompt">
                            </label>
                        </li>
                        <li class="price">
                            <label for="price">
                                <span class="key">价格</span>
                                <input type="text" id="price1" name="lowPrice" class="J_TCheckPrice J_TPrice1" size="4" value="">
                                <span class="connect-line">-</span>
                                <input type="text" id="price2" name="highPrice" class="J_TCheckPrice J_TPrice2" size="4" value="">
                            </label>
                        </li>
                        <li class="submit">
                            <input class="J_TSubmitBtn btn" type="submit" value="">
                        </li>
                    </ul>
                </form>
                <div class="hot-keys">
                </div>
            </div>
            <s class="skin-box-bt"><b></b></s>
        </div>
    </div>
    <div class="J_TModule">
        <div class="skin-box tb-module tshop-pbsm tshop-pbsm-shop-item-cates">
            <s class="skin-box-tp"><b></b></s>
            <div class="skin-box-hd">
                <i></i>
                <h3>
										<span>
											宝贝分类
										</span>
                </h3>
                <div class="skin-box-act disappear">
                    <a href="#">更多</a>
                </div>
            </div>
            <div class="skin-box-bd">
                <ul class="J_TCatsTree cats-tree J_TWidget">
                    <li class="cat fst-cat float">
                        <h4 class="cat-hd fst-cat-hd">
                            <i class="cat-icon fst-cat-icon acrd-trigger active-trigger ks-switchable-trigger-internal574"></i>
                            <a href="/shop/search.htm?brandId=${shop.id}" class="cat-name fst-cat-name" title="查看所有宝贝">查看所有宝贝</a>
                        </h4>
                        <ul class="fst-cat-bd ks-switchable-panel-internal575">
                            <a href="/shop/search.htm?brandId=${shop.id}" class="cat-name" title="按默认">按综合</a>
                            <a href="/shop/search.htm?brandId=${shop.id}&orderType=hotsell_desc" class="cat-name" title="按销量">按销量</a>
                            <a href="/shop/search.htm?brandId=${shop.id}&orderType=newOn_desc" class="cat-name" title="按新品">按新品</a>
                            <a href="/shop/search.htm?brandId=${shop.id}&orderType=price_asc" class="cat-name" title="按价格">按价格</a>
                        </ul>
                    </li>
                    <c:forEach items="${allCategory}" var="shopCategory" varStatus="vs">
                        <li class="cat fst-cat no-sub-cat ">
                            <h4 class="cat-hd fst-cat-hd">
                                <i class="cat-icon fst-cat-icon"></i>
                                <a class="cat-name fst-cat-name" href="/shop/category.htm?brandId=${shop.id}&shopCategory=${shopCategory.value.id}">${shopCategory.value.scName}</a>
                            </h4>
                        </li>
                    </c:forEach>
                </ul>
            </div>
            <s class="skin-box-bt"><b></b></s>
        </div>
    </div>
    <div class="J_TModule">
        <div class="skin-box tb-module tshop-pbsm tshop-pbsm-shop-top-list">
            <s class="skin-box-tp"><b></b></s>
            <div class="skin-box-hd">
                <i class="hd-icon"></i>
                <h3>
                    <span>宝贝排行榜</span>
                </h3>
                <div class="skin-box-act disappear">
                    <a href="#" class="more">更多</a>
                </div>
            </div>
            <div class="skin-box-bd">
                <ul class="top-list-tab">
                    <li class="selected" id="xs"><span class="J_SaleTab tab1">销售量</span></li>
                    <li class=" J_Collect" id="sc"><span class="J_CollectTab tab2">收藏数</span></li>
                </ul>
                <div class="panels">
                    <div class="panel sale" id="sale">
                        <ul>
                            <c:forEach items="${dealDescProducts}" var="product" varStatus="vs">
                                <li class="item even ${vs.first?'first':vs.last?'last':'totoro'}">
                                    <div class="ranking">
                                        <span>${vs.index+1}</span>
                                    </div>
                                    <div class="more">
                                        <a href="/buy.htm?pid=${product.id}" target="_blank">
                                            <img src="${product.productImages.get(0).imagePath}" class="hover-show"></a>
                                    </div>
                                    <div class="img">
                                        <a href="/buy.htm?pid=${product.id}" target="_blank"><img alt="商品图片" src="${product.productImages.get(0).imagePath}" class="hover-show"></a>
                                    </div>
                                    <div class="detail">
                                        <p class="desc">
                                            <a href="/buy.htm?pid=${product.id}" target="_blank">${product.productName}</a></p>
                                        <p class="price">￥<span>${tfn:formatNumber(product.nowPrice, 2)} </span></p>
                                        <p class="sale">
                                            已售出<span class="sale-count">${product.dealCount}</span>笔 </p>
                                    </div>
                                </li>
                            </c:forEach>
                        </ul>
                    </div>
                    <div class="panel collection disappear" id="collection">
                        <ul>
                            <c:forEach items="${collectDescProducts}" var="product" varStatus="vs">
                                <li class="even ${vs.first?'first':vs.last?'last':'totoro'}">
                                    <div class="ranking">
                                        <span>1</span>
                                    </div>
                                    <div class="more">
                                        <a target="_blank" href="/buy.htm?pid=${product.id}">
                                            <img class="hover-show" src="${product.productImages.get(0).imagePath}">
                                        </a>
                                    </div>
                                    <div class="img">
                                        <a href="/buy.htm?pid=${product.id}">
                                            <img class="hover-show" src="${product.productImages.get(0).imagePath}" alt="商品图片">
                                        </a>
                                    </div>
                                    <div class="detail">
                                        <p class="desc"><a href="/buy.htm?pid=${product.id}" target="_blank">${product.productName}</a></p>
                                        <p class="price"><span class="symbol">¥</span><span>${tfn:formatNumber(product.nowPrice, 2)}</span></p>
                                        <p class="sale">已收藏<span class="sale-count">${product.collectCount}</span>笔</p>
                                    </div>
                                </li>
                            </c:forEach>
                        </ul>
                    </div>
                    <div class="control-group">
                        <a class="collect-this-shop border-radius" href="" target="_blank">收藏本店</a>
                        <span class="split">/</span>
                        <a class="show-more border-radius hotsell_desc" target="_blank" href="/shop/search.htm?brandId=${shop.id}">查看更多宝贝</a>
                    </div>
                </div>
            </div>
            <s class="skin-box-bt"><b></b></s>
        </div>
    </div>
</div>
<script>
    $(".tshop-pbsm-shop-top-list .panels li").hover(function () {
        $(this).addClass("hover").siblings().removeClass("hover");
    }, function () {
        $(this).removeClass("hover");
    });

    $(".tshop-pbsm-shop-top-list .panels li .img").hover(function () {
        $(this).parent().addClass("show-more").siblings().removeClass("show-more");
    }, function () {
        $(this).parent().removeClass("show-more");
    });

    $(".tshop-pbsm-shop-top-list .panels li .more").mouseenter(function () {
        $(this).parent().addClass("show-more").siblings().removeClass("show-more");
    }).mouseleave(function () {
        $(this).parent().removeClass("show-more");
    });

        $(function(){
        $(".top-list-tab li").hover(function(){
            $(this).addClass("selected hover").siblings().removeClass("selected hover");
        });
        $("#xs").hover(function(){
        $("#collection").addClass("disappear").siblings().removeClass("disappear");

    });
        $("#sc").hover(function(){
        $("#sale").addClass("disappear").siblings().removeClass("disappear");
    });
    });
</script>
</body>
</html>
